<!DOCTYPE html>
<html lang="ja">
	<head>
		<meta charset="utf-8">
		<style>
		body {
			margin: 0;
			padding: 2em;
			font-size: 2em;
			background-color: #c8a;
		}
		body:-webkit-full-screen {
			width: 100%;
			height: 100%;
		}
		</style>
		<script>
		function full() {
			document.body.webkitRequestFullScreen();
		}
		window.addEventListener("load", function(){
			$("fullbtn").addEventListener("click", function(){
				full();
			});
			// window.setTimeout(full, 1000);
			// full();
		});
		window.addEventListener("keypress", function(event){
			if(event.keyCode == 102 /* == "f" */) {
				full();
			}
		});
		</script>
		<title>fullscreen</title>
	</head>
	<body>
		<p><a href="javascript:full()" id="fullbtn">Fullscreen</a></p>
	</body>
</html>
